require "class"

BaseState = class()
function BaseState:init(...)
  self.name, self.x = ...
end
function BaseState:Show()
   print(self.name, self.x)
end

state = BaseState("initstate", 1)
state:Show()